/*lic*/
#ifndef __EXMC_INIT_HELPER_H__
#define __EXMC_INIT_HELPER_H__

#include <rtthread.h>
#include "main.h"

#define DATA_BUF_LEN (0x8000UL)

#define BSP_Sdram1_SIZE            (32UL * 1024UL * 1024UL)     /* 8MBytes*/

#define BSP_Sdram1_START_ADDR      (EXMC_DMC_GetChipStartAddr(EXMC_DMC_CHIP0))
#define BSP_Sdram1_END_ADDR        (BSP_Sdram1_START_ADDR + BSP_Sdram1_SIZE - 1UL)

extern uint32_t m_u32StartAddr;
extern uint32_t m_u32ByteSize;

//extern uint8_t m_au8ReadData[DATA_BUF_LEN];
//extern uint8_t m_au8WriteData[DATA_BUF_LEN];

//extern uint16_t m_au16ReadData[DATA_BUF_LEN];
//extern uint16_t m_au16WriteData[DATA_BUF_LEN];

//extern uint32_t m_au32ReadData[DATA_BUF_LEN];
//extern uint32_t m_au32WriteData[DATA_BUF_LEN];

//extern uint32_t m_u32TestCnt;
//extern uint32_t m_u32ByteTestErrorCnt;
//extern uint32_t m_u32HalfwordTestErrorCnt;
//extern uint32_t m_u32WordTestErrorCnt;

void App_SdramCfg(void);

void InitTestData(void);
void BSP_Sdram_GetMemInfo(uint32_t *pu32MemoryStartAddr, uint32_t *pu32MemoryByteSize);

//uint32_t MEMORY_Access8(uint32_t u3AccessAddr, uint32_t NumBytes);
//uint32_t MEMORY_Access16(uint32_t u3AccessAddr, uint32_t NumHalfwords);
//uint32_t MEMORY_Access32(uint32_t u3AccessAddr, uint32_t NumWords);

#endif /* __EXMC_INIT_HELPER_H__ */

/*eof*/
